package com.fagertveit.android.game.cb;

import com.fagertveit.android.game.framework.Music;
import com.fagertveit.android.game.framework.Sound;
import com.fagertveit.android.game.framework.gl.Animation;
import com.fagertveit.android.game.framework.gl.Font;
import com.fagertveit.android.game.framework.gl.Image;
import com.fagertveit.android.game.framework.gl.Texture;
import com.fagertveit.android.game.framework.gl.TextureRegion;
import com.fagertveit.android.game.framework.impl.GLGame;

public class Assets {
	public static Texture menu;
	public static Texture gameGfx;
	public static Texture fontMap;
	
	public static TextureRegion menuBackRegion;
	public static TextureRegion menuBtnOff;
	public static TextureRegion menuBtnOn;
	public static TextureRegion bigWindow;
	public static TextureRegion musicIcon;
	public static TextureRegion soundIcon;
	public static TextureRegion volumeCtrlBack;
	public static TextureRegion volumeCtrl;
	public static TextureRegion radioOff;
	public static TextureRegion radioOn;
	
	public static TextureRegion gameBack;
	public static TextureRegion bat;
	public static TextureRegion ball;
	public static TextureRegion brick;
	
	public static Image brickX2;
	
	public static Font font;
	
	public static void load(GLGame game) {
		menu = new Texture(game, "imagemap01.png");
		gameGfx = new Texture(game, "imagemap02.png");
		fontMap = new Texture(game, "font.png");
		
		menuBackRegion = new TextureRegion(menu, 0, 0, 640, 480);
		menuBtnOff = new TextureRegion(menu, 448, 480, 128, 42);
		menuBtnOn = new TextureRegion(menu, 448, 544, 128, 42);
		bigWindow = new TextureRegion(menu, 0, 480, 448, 400);
		soundIcon = new TextureRegion(menu, 576, 480, 64, 64);
		musicIcon = new TextureRegion(menu, 576, 544, 64, 64);
		volumeCtrlBack = new TextureRegion(menu, 468, 640, 108, 32);
		volumeCtrl = new TextureRegion(menu, 468, 608, 108, 32);
		radioOff = new TextureRegion(menu, 576, 608, 32, 32);
		radioOn = new TextureRegion(menu, 608, 608, 32, 32);
		
		brickX2 = new Image(game, "item_brick.png");
		
		font = new Font(fontMap, 0, 0, 11, 22, 22);
		
		gameBack = new TextureRegion(gameGfx, 0, 0, 640, 480);
		bat = new TextureRegion(gameGfx, 0, 544, 64, 16);
		ball = new TextureRegion(gameGfx, 0, 576, 16, 16);
		brick = new TextureRegion(gameGfx, 0, 608, 35, 17);
	}
	
	public static void reload() {
		menu.reload();
		gameGfx.reload();
	}
	
	public static void playSound(Sound sound) {
		sound.play(1);
	}
}
